{% extends 'base/base.html' %}
{% load static %}

{% block title %}
    购物车
{% endblock %}

{% block extcss %}
    <link rel="stylesheet" href="{% static 'cart/css/cart.css' %}">
{% endblock %}

{% block extjs %}
    <script src="{% static 'cart/js/cart.js' %}"></script>
{% endblock %}

{% block content %}
    <div class="cart">
        <ul>
            {% for cart in carts %}
                <li class="goods">
                    <div class="confirm-wrapper" cartid="{{ cart.id }}">
                        {% if cart.isselect %}
                            <span class="glyphicon glyphicon-ok"></span>
                        {% else %}
                            <span class="no"></span>
                        {% endif %}
                    </div>
                    <div class="content-wrapper">
                        <div class="img">
                            <img src="{{ cart.goods.productimg }}" alt="">
                        </div>
                        <div class="detail">
                            <p class="name">{{ cart.goods.productlongname }}</p>
                            <p class="price" price="{{ cart.goods.price }}"> ￥ {{ cart.goods.price }}</p>
                            <p class="num" num="{{ cart.number }}">x{{ cart.number }}</p>
                        </div>
                    </div>
                </li>
            {% endfor %}
        </ul>
        <div class="bill">
            <div class="bill-left">
                <div class="all" isall="false">
                    <span class="no"></span>
                    <b>全选</b>
                </div>
                <div class="total">
                    <span>￥</span>
                    <b>200</b>
                </div>
            </div>
            <div class="bill-right" id="generateorder">
                下单
            </div>
        </div>
    </div>
{% endblock %}